package com.agnes.phone.service;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.agnes.phone.R;

public class PhoneServicePage extends AppCompatActivity {
    private Intent phoneIntent;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_phone_state);

        phoneIntent = new Intent(this, PhoneService.class);
        startService(phoneIntent);

    }


    @Override
    protected void onDestroy() {
        super.onDestroy();
        if (phoneIntent != null) {
            stopService(phoneIntent);
        }
    }

}
